//
//  BloodOxygenDataModel.swift
//  TimeBoat
//
//  Created by Jun on 2022/9/8.
//  Copyright © 2022 Time Boat. All rights reserved.
//

import Foundation

/// 血氧
@objcMembers class BloodOxygenDataModel: NSObject {
    /// 血氧
    @objc var bloodOxygen: UInt8 = 0
    
    private let DATA_LEN_MIN = 1
    
    convenience init(buf: [UInt8]) {
        self.init()
        
        if (buf.count == DATA_LEN_MIN) {
            bloodOxygen = buf[0]
        }
    }
    
    @objc func toString() -> String {
        var str = self.yy_modelToJSONString()
        if nil == str {
            str = ""
        }
        
        return str!
    }
}
